import request from "./request";

// 角色
export const getRoles = (params = {}) => request.get("/role/list", { params });

export const saveOrUpdateRole = (data) => request.post("/role", data);

export const deleteRole = (data = []) => {
  //等价于request.DELETE("/role/list", { data }
  return request({
    method: "DELETE",
    url: "/role",
    data,
  });
};

export const getRoleOption = () => request.get("/role/option");
